package com.itheima.collection;

import java.util.ArrayList;
import java.util.Collection;

public class Demo04 {

    public static void main(String[] args) {
        Collection<String> collection=new ArrayList<>();
        collection.add("蔡徐坤");
        collection.add("鹿晗");
        collection.add("鹿晗");
        collection.add("张艺兴");
        collection.add("黄子韬");
        collection.add("吴签");

        for (String s : collection) {
            System.out.println(s);
            if(s.equals("鹿晗")){
              collection.add("晓彤");
            }
        }
        System.out.println(collection);
    }
}
